#coding=utf-8
print '0       1       2        3        4           5         6         7         8         9'
for i in range(1,10):
    print i,'   ',
    for j in range(1,10):
        if j>i:
            break
        else:
            print "%d*%d=%d%s"%(i,j,i*j,'   '),
    print '\n',
